package compoundDB.core;

import java.io.Serializable;

public class Bond implements Serializable {
	private BondType m_type;
	private Atom m_atom1;
	private Atom m_atom2;
	
	/**
	 * Creates a new Bond of the specified type.
	 * @param type The type of bond to create.
	 * @param atom1 The first atom linked to the bond.
	 * @param atom2 The second atom linked to the bond.
	 */
	public Bond(BondType type, Atom atom1, Atom atom2) {
		m_type = type;
		m_atom1 = atom1;
		m_atom2 = atom2;
	}
	
	/**
	 * Gets the type of the bond (single, double, etc.).
	 * @return An enum showing the type of bond.
	 */
	public BondType getBondType() {
		return m_type;
	}
	
	public Atom getFirstAtom() {
		return m_atom1;
	}
	
	public Atom getSecondAtom() {
		return m_atom2;
	}
	
	public enum BondType {
		SINGLE, DOUBLE, TRIPLE, AROMATIC;
	}
	
	/* Not used yet - should I keep?
	public enum BondStereo {
		NONE, UP, DOWN, EITHER;
	}	
	public enum BondTopology {
		RING, CHAIN, EITHER;
	} */
}
